package 第4节面向对象;

public class Dog {
    String name;
    int age;
    public Dog() {

    }
    public Dog(String name) {
        this.name = name;
    }
    public void 叫() {
        System.out.println(name);
        System.out.println(age);
        System.out.println("汪汪汪~");
    }
    public void 护食() {
        System.out.println(name);
        System.out.println(age);
        System.out.println("别跟狗抢~");
    }
}
